package com.xjd.transport;


public interface Future {
	
	long getDoneBytes();
	
	Channel getChannel();
	
	boolean cancel();
	
    boolean isDone();

    boolean isCancelled();

    boolean isSuccess();
    
    boolean isFailed();

    Throwable getCause();

	void addListener(FutureListener listener);
	
	void removeListener(FutureListener listener);
	
    Future await() throws InterruptedException;

    Future awaitUninterruptibly();

    boolean await(long timeoutMillis) throws InterruptedException;

    boolean awaitUninterruptibly(long timeoutMillis);
}
